import fs from 'fs'

function getPromise(url) {
    return new Promise((resolve, reject) => {
        fs.readFile(url, 'utf8', (err, data) => {
            resolve(data)
        })
    })
}
getPromise('./01-txt/a.txt').then(res => {
    console.log(res);
    return getPromise('./01-txt/b.txt')
}).then(res => {
    console.log(res);
    return getPromise('./01-txt/c.txt')
}).then(res => {
    console.log(res);
})